from nodetypes.ntypes.Document.view.RDF import Transform, Document


class Document(Document):
    
    def getStatements(self, context, consumer):
        return self.getModelStatements(
            context,
            super(Document, self).getStatements(context, consumer)
        )  
           
    def getModelStatements(self, context, consumer):
        model = context.model
        consumer(model.rdf_toStatements('mFor_Index'))
        for n in model.mFor_Graph:
            consumer(
                n.rdf_toStatements('mPrimary_Type')
            )
      
        return consumer


class Transform(Transform):
    
    newDocument = Document